package org.mozhu.zufang.guanjia.web.controller;

import org.mozhu.mboot.core.json.JSON;
import org.mozhu.zufang.guanjia.entity.User;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HomeController {

    @Value("${profile}")
    private String profile;

    @RequestMapping("/")
    public String home() {
        User user = new User();
        user.setName("zhangsan");
        user.setEmail("zhangsan@qq.com");
        String s = JSON.toPrettyJson(user);
        System.out.println(s);
        return "hello world" + profile;
    }

    @RequestMapping("/profile")
    public String profile() {
        return profile;
    }


}
